﻿using FluentValidation;

namespace RockBus.ConfigurationService.Validation
{
    public static class CustomValidatorExtensions
    {
        public static IRuleBuilderOptions<T, TProperty> NullOrNotEmpty<T, TProperty>(this IRuleBuilder<T, TProperty> ruleBuilder)
        {
            return ruleBuilder.SetValidator(new NullOrNotEmptyValidator(default(TProperty)));
        }
    }
}